home *** CD-ROM | disk | FTP | other *** search
- on startMovie
- toggleColorDepth()
- initCOPE()
- if not (the quickTimePresent) then
- qtAlert()
- quit()
- end if
- set the searchPath to []
- set currPath to the pathName
- set firstMovie to "COPINTRO"
- put "startup path = " && currPath
- if the machineType = 256 then
- set delim to "\"
- set fromCD to 0
- set thePath to the pathName & "COPE\FIND\"
- set theFile to "COPE.txt"
- if LocateFile(thePath, theFile) then
- set fromCD to 1
- set pathToLaunch to currPath & "COPE" & delim & firstMovie
- alert("We are running from the CD" & RETURN & pathToLaunch)
- else
- set partPath to "\COPE\FIND\"
- set theFile to "cope.txt"
- set driveLetter to GetDriveLetter(partPath, theFile)
- if driveLetter = -1 then
- alert("Please make sure the CD is inserted, and try again")
- halt()
- else
- set pathToLaunch to driveLetter & ":\COPE" & delim & firstMovie
- set dataPath to currPath & "data" & delim
- add(the searchPath, driveLetter & ":\")
- add(the searchPath, dataPath)
- end if
- end if
- else
- set delim to ":"
- if LocateFile("COPE:COPE:FIND:", "COPE.TXT") then
- set pathToLaunch to "COPE:COPE:COPINTRO"
- set the itemDelimiter to ":"
- if item 1 of currPath = item 1 of pathToLaunch then
- else
- end if
- add(the searchPath, "COPE:COPE:")
- add(the searchPath, "COPE:")
- else
- set tryThisPath to the pathName & "COPE:FIND:"
- if LocateFile(tryThisPath, "COPE.TXT") then
- set pathToLaunch to the pathName & "COPE:COPINTRO"
- else
- alert("Sorry, I can't locate the Cope with Cancer CD-ROM on your system. Please make sure the Cope with Cancer CD is inserted and try again.")
- halt()
- end if
- end if
- end if
- initCOPE()
- go(1, pathToLaunch)
- end
-
- on qtAlert
- if the machineType = 256 then
- alert("QuickTime for Windows is required in order to run the Cope with Cancer CD.")
- else
- alert("QuickTime is required in order to run the Cope with Cancer CD. QuickTime is supplied on the Cope with Cancer CD.")
- end if
- end
-
- on GetDriveLetter thePath, theFile
- put "GetDriveLetter:" & "---" & thePath & "---" & theFile
- repeat with i = 67 to 90
- set aPath to numToChar(i) & ":" & thePath
- if LocateFile(aPath, theFile) then
- exit repeat
- end if
- end repeat
- if i <= 90 then
- put thePath && theFile
- return numToChar(i)
- else
- return -1
- end if
- end
-
- on LocateFile aPath, aFile
- put aPath & aFile
- set bFile to getNthFileNameInFolder(aPath, 1)
- if aFile = bFile then
- return 1
- else
- return 0
- end if
- end
-
- on toggleColorDepth
- global gUserColorDepth
- set gUserColorDepth to the colorDepth
- if gUserColorDepth = 8 then
- exit
- end if
- if gUserColorDepth > 8 then
- set the colorDepth to 8
- end if
- if gUserColorDepth < 8 then
- set the colorDepth to 8
- end if
- end
-